package com.wis.service.impl;

import com.wis.entity.CourseEntity;
import com.wis.entity.LiveCourseEntity;
import com.wis.mapper.LiveCourseMapper;
import com.wis.service.LiveCourseService;
import com.wis.util.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LiveCourseImpl implements LiveCourseService {
    @Autowired
    private LiveCourseMapper liveCourseMapper;
    @Override
    public CommonResult selectLiveCourse(String tName,String cName) {
        List<LiveCourseEntity> courseEntityList = liveCourseMapper.selectLiveCourse(tName,cName);
        return CommonResult.build(200, "ok", courseEntityList.size(), courseEntityList);
    }
}
